package com.atguigu.gmall.search.vo;

import com.atguigu.gmall.search.entity.Goods;
import com.atguigu.gmall.search.entity.SearchAttr;
import lombok.Data;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.List;
import java.util.Objects;

/**
 * @author lfy
 * @Description 检索需要返回的数据
 * @create 2023-07-24 10:45
 */
@Data
public class SearchRespVo {

    //1、检索参数，主要用来做回显
    private SearchParamVo searchParam;

    //2、品牌面包屑
    private String trademarkParam;

    //3、平台属性面包屑
    private List<SearchAttr> propsParamList;

    //4、品牌列表  //构建品牌检索区
    private List<TrademarkVo> trademarkList;

    //5、属性列表集合; //构建属性检索区
    private List<AttrVo> attrsList;

    //6、排序高亮
    private SortVo orderMap;

    //7、商品列表
    private List<Goods> goodsList;

    //8、当前页码
    private Integer pageNo;

    //9、总页码
    private Long totalPages;


    //TODO 9、
    private String urlParam;


    @Data
    public static class TrademarkVo {
        private Long tmId;
        private String tmName;
        private String tmLogoUrl;
    }

    @Data
    public static class AttrVo{
        private Long attrId;
        private String attrName;
        private List<String> attrValueList;
    }

    @Data
    public static class SortVo {
        private String type;//排序类型
        private String sort;
    }

}
